package com.baizhi.cmfzdemo.appControlle;

import com.baizhi.cmfzdemo.entity.CmfzAudio;
import com.baizhi.cmfzdemo.service.CmfzAudioService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by 54433 on 2019/4/12.
 */
@RestController
@RequestMapping("/CmfzAudio")
public class AppCmfzAudioController {
    @Autowired
    private CmfzAudioService cmfzAudioService;

    @RequestMapping("/showAllCmfzAudio/{albumId}")
    public List<CmfzAudio> showAllCmfzAudio(@PathVariable("albumId") int albumId){
        return cmfzAudioService.showAllAudio(albumId);
    }

}
